@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <div class="panel panel-default">
                <div class="panel-heading">消息历史</div>
                <div class="panel-body">
                    @if (count($errors) > 0)
                        <div class="alert alert-danger">
                            {!! implode('<br>', $errors->all()) !!}
                        </div>
                    @endif

                    @foreach ($notifications as $notification)
                        <div class="article">
                            <p><a href="{{ url('category').'?name='.$notification->category_name }}">{{ $notification->category_name }}</a>于 {{ $notification->created_at }} 增加了文章</p>
                            <p>
                                <a href="{{ url('article/'.$notification->article_id) }}">《{{ $notification->article_title }}》</a>
                            </p>
                        </div>
                    @endforeach

                </div>
                
            </div>
        </div>
    </div>
</div>
@endsection